* gtk_file_chooser_get_filenames:
* @chooser: a #GtkFileChooser
*
- * Lists all the files and subfolders in the current folder of
- * @chooser. The returned names are full absolute paths. If files
- * in the current folder cannot be represented as local filenames
- * they will be ignored. (See gtk_file_chooser_get_uris())
+ * Lists all the selected files and subfolders in the current folder of
+ * @chooser. The returned names are full absolute paths. If files in the current
+ * folder cannot be represented as local filenames they will be ignored. (See
+ * gtk_file_chooser_get_uris())
*
- * Return value: a #GList containing the filenames of all
+ * Return value: a #GSList containing the filenames of all selected
* files and subfolders in the current folder. Free the returned list
- * with g_lists_free(), and the filenames with g_free().
+ * with g_slist_free(), and the filenames with g_free().
**/
GSList *
gtk_file_chooser_get_filenames (GtkFileChooser *chooser)
}
/**
- * gtk_file_chooser_get_filenames:
+ * gtk_file_chooser_get_uris:
* @chooser: a #GtkFileChooser
*
- * Lists all the files and subfolders in the current folder of
+ * Lists all the selected files and subfolders in the current folder of
* @chooser. The returned names are full absolute URIs.
*
- * Return value: a #GList containing the URIs of all
+ * Return value: a #GSList containing the URIs of all selected
* files and subfolders in the current folder. Free the returned list
- * with g_lists_free(), and the filenames with g_free().
+ * with g_slist_free(), and the filenames with g_free().
**/
GSList *
gtk_file_chooser_get_uris (GtkFileChooser *chooser)
* _gtk_file_chooser_get_paths:
* @chooser: a #GtkFileChooser
*
- * Lists all the files and subfolders in the current folder of
- * @chooser as #GtkFilePath. An internal function, see
- * gtk_file_chooser_get_uris().
+ * Lists all the selected files and subfolders in the current folder of @chooser
+ * as #GtkFilePath. An internal function, see gtk_file_chooser_get_uris().
*
- * Return value: a #GList containing a #GtkFilePath for each
- * files and subfolder in the current folder. Free the returned list
- * with g_lists_free(), and the paths with gtk_file_path_free().
+ * Return value: a #GSList containing a #GtkFilePath for each selected
+ * file and subfolder in the current folder. Free the returned list
+ * with g_slist_free(), and the paths with gtk_file_path_free().
**/
GSList *
_gtk_file_chooser_get_paths (GtkFileChooser *chooser)
dialog->priv = priv;
}
+/* Callback used when the user activates a file in the file chooser widget */
+static void
+file_chooser_widget_file_activated (GtkFileChooser *chooser,
+ GtkFileChooserDialog *dialog)
+{
+ gtk_window_activate_default (GTK_WINDOW (dialog));
+}
+
static GObject*
gtk_file_chooser_dialog_constructor (GType type,
guint n_construct_properties,
NULL);
else
priv->widget = g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET, NULL);
+
+ g_signal_connect (priv->widget, "file-activated",
+ G_CALLBACK (file_chooser_widget_file_activated), object);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
gtk_widget_show (priv->widget);